{/* LAYOUT模板 */}
	<layout name="layout"/>
{/* LAYOUT模板 */}

{/* import Js,Css */}
	<js href="__PUBLIC__/Js/admin/listTable.js"/>
	<js href="__PUBLIC__/Js/admin/js.util.js"/>
	<css href="__PUBLIC__/Css/admin/common.css"/>
	
	<css href="__PUBLIC__/Css/jquery-ui.css" />
	<js href="__PUBLIC__/Js/jquery-ui.1.10.4.js" />
	<js href="__PUBLIC__/Js/core/plugins.js"/>
{/* import Js,Css */}

<!-- [position] -->
	<include file="Template:position"/>
<!-- [position] -->

<!-- [帅选框] -->	
	<include file="Library:course_filter"/>
<!-- [帅选框] -->
<div id="content">
	<include file="Library:course_list" />
</div>

<!-- [气泡提示框插件HTML代码] -->
	<include file="Core:QTip"/>
<!-- [气泡提示框插件HTML代码] -->
<div id="loading"class="hide"><!--Qloading:不能删除--></div>

<script>
	// Initialize Url
	listTable.init('__URL__/ajaxTable');
	/* 气泡提示框 */
	$('a[title]').qtip({ 
		style: { name: 'green'/* black,cream,green,dark,light,red,blue */, tip: true },
		position: { adjust: { screen: true } } /* 根据位置自动调整 */
	});
	
	// 移除课程到回收站
	$("a.del").click(function(){
		// get Id
		var id = $(this).attr('data');		
		$.ajax({
			url:"__URL__/ajaxTable",
			data:{'id':id,'action':'del'},
			dataType:'json',
			type:'post',
			beforeSend:function(){
				$('#loading').QLoading({'text':'处理中','status':'open','model':false});
			},
			success:function(msg){				
				if(msg.data == '1'){
					var tr = $("#tr_" + id);
					tr.remove();
					$('#loading').QLoading({'text':msg.info,'status':'close','time':0.5,'img':'happy','model':false});
				}
				else{
					$('#loading').QLoading({'text':msg.info,'status':'close','time':1,'img':'sad','model':false});
				}
			}		
		});
	});
</script>







